home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Examples / Draw / Include / DrawView.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  2.5 KB  |  86 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                DrawView.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Author:                Laurent Delamare
  7. //
  8. //    Copyright:    © 1993, 1995 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef DRAWVIEW_H
  13. #define DRAWVIEW_H
  14.  
  15. // ----- Part Layer -----
  16.  
  17. #ifndef FWVIEW_H
  18. #include "FWView.h"
  19. #endif
  20.  
  21. //========================================================================================
  22. // Forward Declaration
  23. //========================================================================================
  24.  
  25. #if FW_LIB_EXPORT_PRAGMAS
  26. #pragma import on
  27. #endif
  28. class FW_CLASS_ATTR FW_CGraphicContext;
  29. #if FW_LIB_EXPORT_PRAGMAS
  30. #pragma import off
  31. #endif
  32.  
  33. class FW_CLASS_ATTR CDrawPart;
  34. class FW_CLASS_ATTR CDrawFrame;
  35. class FW_CLASS_ATTR CDrawSelection;
  36.  
  37. //========================================================================================
  38. // Class CDrawView
  39. //========================================================================================
  40.  
  41. class FW_CLASS_ATTR CDrawView : public FW_CView
  42. {
  43. public:
  44.     FW_DECLARE_CLASS
  45.  
  46. //----------------------------------------------------------------------------------------
  47. // Initialization/destruction
  48. //
  49. public:        
  50.     CDrawView(Environment *ev, CDrawFrame* frame, FW_CRect& bounds, CDrawPart* drawPart);
  51.     virtual ~ CDrawView();
  52.  
  53. //----------------------------------------------------------------------------------------
  54. // Inherited API
  55. //
  56. public:        
  57.     // -----
  58.     virtual FW_Boolean        AdjustCursor(Environment *ev, ODFacet* facet, const FW_CPoint& where);
  59.     
  60.     // -----
  61.     virtual void             Draw(Environment *ev, ODFacet* odFacet, ODShape* invalidShape);
  62.  
  63.     // ----- Events -----
  64.     virtual FW_Boolean        DoMouseDown(Environment *ev, const FW_CMouseEvent& theMouseEvent);
  65.     virtual FW_Boolean        DoMouseDownInEmbeddedFrame(Environment* ev, const FW_CEmbeddedMouseEvent& theEmbeddedMouseEvent);
  66.     virtual FW_Boolean        DoMouseDownInEmbeddedFrameBorder(Environment *ev, const FW_CBorderMouseEvent& theBorderMouseEvent);
  67.  
  68.     virtual FW_Boolean        Activate(Environment* ev);
  69.     virtual void            Deactivate(Environment* ev);
  70.  
  71. //----------------------------------------------------------------------------------------
  72. //    New API
  73. //
  74. protected:
  75.     void                    DrawGrid(Environment *ev, FW_CGraphicContext& gc, const FW_CRect& invalidRect);    
  76.  
  77. //----------------------------------------------------------------------------------------
  78. // Data Members
  79. //
  80. private:    
  81.     CDrawPart*                fDrawPart;
  82.     CDrawFrame*                fDrawFrame;
  83. };
  84.  
  85. #endif
  86.